-
Notifications
You must be signed in to change notification settings - Fork 26k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added "negative matcher" documentation #40282
Conversation
docs/advanced-features/middleware.md
Outdated
@@ -88,6 +88,22 @@ export const config = { | |||
} | |||
``` | |||
|
|||
You can also create a "negative matcher" that matches all paths except for certain paths: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we expand this to say full regex matching can be used including negative lookaheads like this
* - static (static files) | ||
* - favicon.ico (favicon file) | ||
*/ | ||
'/((?!api|static|favicon.ico).*)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I exclude the homepage "/" from the matches?
Bug
fixes #number
contributing.md
Feature
fixes #number
contributing.md
Documentation / Examples
pnpm lint